package com.balabala.gym_consume.mapper;


import com.balabala.gym_consume.pojo.dto.OrderServiceDto;
import com.balabala.gym_consume.pojo.dto.UpdateOrderStatusDTO;
import com.balabala.gym_consume.pojo.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.balabala.gym_consume.pojo.entity.Order;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (Order)表数据库访问层
 *
 * @author 何涛
 * @since 2023-05-07 16:58:33
 */
@Repository
public interface OrderMapper extends BaseMapper<Order> {

    /**
     * 模糊查询订单
     * @param orderServiceDto
     * @return
     */
    List<OrderVo> findAllByLike(OrderServiceDto orderServiceDto);

    /*
    * 根据sn查询出商品基本信息*/
    OrderBySnVo findOrderBySn(String sn);

    /*根据sn订单编号查询出商品信息*/
    GoodSnVo findGoodBySn(String sn);

    //根据ids批量修改订单状态
    boolean updateOrderStatusByIds(List<Long> ids);
}

